<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增预约信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-add" th:object="${tableInfo}">
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">姓名：</label>
                        <div class="col-sm-8">
                            <input name="Name" class="form-control" disabled type="text" th:field="*{Name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">电话：</label>
                        <div class="col-sm-8">
                            <input name="number" class="form-control" disabled type="text" th:field="*{number}">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">单位及职务：</label>
                        <div class="col-sm-8">
                            <input name="job" class="form-control" disabled type="text" th:field="*{job}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">听课人数：</label>
                        <div class="col-sm-8">
                            <input name="personNumber" class="form-control" disabled type="text" th:field="*{personNumber}">
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div>
                    <label class="col-sm-3 control-label">申请项目内容：</label>
                </div>
                <div class="col-sm-8">
                    <ul>
                        <li th:each="item:${tableInfo.tableSet}">[[${item.name}]]
                            <ul>
                                <li  th:each="item2:${item.children}" th:text="${item2.name}"></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">室内场地：</label>
                        <div class="col-sm-8" th:with="type=${@dict.getType('palce_type')}">
                            <input name="job" class="form-control" disabled type="text" th:value="${type[0].dictLabel}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">可容纳人数：</label>
                        <div class="col-sm-8">
                            <input name="personNumber" class="form-control" type="text" disabled th:field="*{placeSet}" th:if="${tableInfo.placeSet} lt '1'">
                            <input name="personNumber" class="form-control" type="text" disabled th:field="*{placeSet}" th:else>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">用于开展活动的室外场地面积：</label>
                <div class="col-sm-8">
                    <input name="personNumber" class="form-control" disabled type="text" th:field="*{palceArea}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">其他设施：</label>
                <div class="col-sm-8">
                    <input name="personNumber" class="form-control" disabled type="text" th:field="*{otherEquipment}">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "order/info"
        $("#form-info-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-info-add').serialize());
            }
        }
    </script>
</body>
</html>